#include"Ham.h"

int main()
{
	Node* head=NULL;

	cout<<"Danh sach: ";
	insertfirst(head, 5);
	insertfirst(head, 4);
	insertfirst(head, 3);
	insertfirst(head, 2);
	insertfirst(head, 20); 
	insertend(head,10);
	insertend(head, 8);
	insertend(head, 72);
	insertfirst(head, 34);
	insertend(head, 10);
	insertend(head, 3);
	insertfirst(head, 181);
	insertend(head, 10);
	display(head);

	cout<<"Danh sach so nguyen: ";
	listint(head);

	cout<<"Cac phan tu k bang do chenh lech giua tong truoc va tong sau: ";
	listk(head);
	cout<<endl;

	cout<<"Danh sach sau khi them so 10 sau so 2: ";
	insertkafterx(head,10,2);
	display(head);

	cout<<"Danh sach sau khi xoa node dau: ";
	deleteNodefirst(head);
	display(head);
	
	cout<<"Danh sach sau khi xoa so 3 dau tien: ";
	deleteNodefirstx(head,3);
	display(head); 

	cout<<"Danh sach sau khi xoa tat ca so 10: ";
	deleteNodeAllx(head,10);
	display(head);		
	cout<<endl;

	deleteAll(head);

	return 0;
}